Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow api_key to be positional #41

Merged
merged 6 commits into from
Nov 14, 2016
Merged

allow api_key to be positional #41

merged 6 commits into from
Nov 14, 2016

Conversation

leohemsted
Copy link
Contributor

@leohemsted leohemsted commented Nov 7, 2016

allow user to say NotificationAPIClient(foo) instead of ...(api_key=foo) (since thats what we say in our docs, and it makes sense)

also removed monotonic as dependency.

this is a breaking change

  • check our usage to make sure we won't break any of our usage by doing this
    • admin
    • api
    • functional tests
      • some changes required
    • py client
  • check if any other teams are using python client and if this would break their usage
    • not going to do. added changelog.md so peeps can see if it's worth upgrading
  • resolve merge conflicts and bump version again

it doesn't make sense that if someone creates a client without any kwargs,
it writes their first positional parameter as the base_url, which users will
rarely, if ever, change. by making api_key a positional argument, the user
can create the ApiClient object without kwargs. eg NotificationsAPIClient(my_api_key).

this is a breaking change if users were originally calling without keywords,
as api_key now preceeds base_url.
@leohemsted leohemsted merged commit 7f00e5f into master Nov 14, 2016
@leohemsted leohemsted deleted the client-params branch November 14, 2016 16:15
@matthew-shaw
Copy link

Thanks! 👍 ⭐️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants